﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 第三次作业
{
    class Square:Shape
    {
        public double edge{ get; set; }
        public double area;
        public Square(double edge)
        {
            this.edge = edge;
            calculate();
        }
        public override void calculate()
        {
            area = edge * edge;
        }
        public override double getArea()
        {
            return area;
        }
        public override bool isTrue()
        {
            if (edge > 0) return true;
            else
                return false;
        }
    }
}
